package com.financing.platform.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.financing.platform.dao.IAdvertDao;
import com.financing.platform.dto.AdvertDTO;
import com.financing.platform.service.IAdvertService;

/**
 * 
 * @ClassName: AdvertServiceImpl
 * @Description: 广告服务器层实现 
 * @author  lisu
 *
 */
@Service("advertServiceImpl")
@Transactional(rollbackFor=Exception.class)
public class AdvertServiceImpl extends BaseServiceImpl implements IAdvertService {

	@Autowired
	private IAdvertDao advertDaoImpl;

	@Override
	public int addAdvert(AdvertDTO advertDTO) throws SQLException {
		return advertDaoImpl.addAdvert(advertDTO);
	}

	@Override
	public List<AdvertDTO> queryAdvertList(AdvertDTO advertDTO)
			throws SQLException {
		return advertDaoImpl.queryAdvertList(advertDTO);
	}

	@Override
	public AdvertDTO queryAdvertInfo(Integer id) throws SQLException {
		return advertDaoImpl.queryAdvertInfo(id);
	}

	@Override
	public int updateAdvert(AdvertDTO advertDTO) throws SQLException {
		return advertDaoImpl.updateAdvert(advertDTO);
	}

	@Override
	public int queryAdvertListCount(AdvertDTO advertDTO) throws SQLException {
		return advertDaoImpl.queryAdvertListCount(advertDTO);
	}
	
	@Override
	public List<AdvertDTO> queryAdvertRecommendList(AdvertDTO advertDTO) throws SQLException{
		return advertDaoImpl.queryAdvertRecommendList(advertDTO);
	}
	@Override
	public int queryAdvertListRecommendCount(AdvertDTO advertDTO) throws SQLException{
		return advertDaoImpl.queryAdvertListRecommendCount(advertDTO);
	}
}
